<?php 
namespace Admin\Model;
use Think\Model;
class GoodsinfoModel extends Model{
     //字段映射
	//映射的规则
	//表单中的name=>表的字段对应
	//允许批量验证
	protected $patchValidate=true;
	protected $_map=array(
      'pt'=>'typeid',
      'pn'=>'pname',
      'pp'=>'price',
      'pc'=>'pcount',
		);
	protected $_validate=array(
     array('typeid','require','编号不能为空'),
     array('pname','require','名字不能为空'),
     array('price','require','价格不能为空'),
     array('pcount','require','库存数量不能为空'),
		);
}